import { ApiProperty } from '@nestjs/swagger'
import { IsInt, IsNotEmpty, IsString } from 'class-validator'

export class CreatePlanTaskDto {
  @ApiProperty({ description: '子计划ID' })
  @IsInt()
  @IsNotEmpty()
  subPlanId: number

  @ApiProperty({ description: '任务类型，1 读一读 2 看一看 3 玩一玩' })
  @IsInt()
  @IsNotEmpty()
  taskType: number

  @ApiProperty({ description: '任务ID' })
  @IsString()
  @IsNotEmpty()
  taskId: string

  @ApiProperty({ description: '任务名称' })
  @IsString()
  @IsNotEmpty()
  taskName: string

  @ApiProperty({ description: '备注' })
  @IsString()
  @IsNotEmpty()
  taskMark: string

  @ApiProperty({ description: '资源关联ID，task_type=1为c_book表id，task_type=2为c_video表id，' })
  @IsInt()
  @IsNotEmpty()
  resourceId: number

  @ApiProperty({ description: '任务内容，使用json配置' })
  @IsString()
  @IsNotEmpty()
  taskContent: string
}
